/*
 * SonarQube
 * Copyright (C) 2009-2017 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
@import (reference) "../variables";
@import (reference) "../mixins";

.login-input {
  width: 100% !important;
  height: auto !important;
  padding: 5px 12px !important;
  font-size: 20px;
  font-weight: 300;
}

.login-label {
  display: none;
  margin-bottom: 8px;
  font-size: 15px;

  .ie9 & { display: block; }
}

.login-remember-me {
  display: none;

  & + label {
    display: inline-block;
    vertical-align: top;
    padding: 2px;
    box-sizing: border-box;

    &:before {
      content: " ";
      display: block;
      width: 10px;
      height: 10px;
      border: 1px solid @darkBlue;
      border-radius: 2px;
      transition: all 0.2s ease;
    }
  }

  &:checked + label:before {
    border-color: @blue;
    background-color: @blue;
    background-image: url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2014%2014%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M12%204.665c0%20.172-.06.318-.18.438l-5.55%205.55c-.12.12-.266.18-.438.18s-.318-.06-.438-.18L2.18%207.438C2.06%207.317%202%207.17%202%207s.06-.318.18-.44l.878-.876c.12-.12.267-.18.44-.18.17%200%20.317.06.437.18l1.897%201.903%204.233-4.24c.12-.12.266-.18.438-.18s.32.06.44.18l.876.88c.12.12.18.265.18.438z%22%20fill%3D%22%23fff%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E');

    .ie9 & { background-position: -3px 0; }
  }

  & ~ label {
    cursor: pointer;
  }
}

.oauth-providers {
  & > ul {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;

    & > li {
      margin-bottom: 30px;

      & > a {
        display: block;
        width: 180px;
        line-height: 22px;
        padding: 8px 12px;
        border: none;
        border-radius: 2px;
        box-sizing: border-box;
        background-color: @darkBlue;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;

        &:hover, &:focus {
          box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.3);
        }

        & > span {
          padding-left: 6px;
        }
      }
    }
  }
}

.oauth-providers + form {
  padding-top: 30px;
  border-top: 1px solid @barBorderColor;
}
